* {
  box-sizing: border-box;
}



/* letter open css  */



#wrapper {
  width: auto;
  margin: auto;
}

.envelope {
  width: 200px;
  height: 100px;
  margin: 0 auto 0;
  background: #ddd;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.25);
  position: relative;
  perspective: 800px;
}
.envelope:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border: 0 solid rgba(0, 0, 0, 0.25);
  border-width: 45px 100px;
  border-top-color: transparent;
  z-index: 2;
}

.envelope .flap {
  position: absolute;
  width: 100%;
  height: 0;
  border: 0 solid transparent;
  border-width: 50px 100px;
  z-index: 3;
}
.envelope .flap.front {
  border-left-color: #eee;
  border-right-color: #eee;
  border-bottom-color: #ccc;
  z-index: 3;
}
.envelope .flap.front:after {
  content: "";
  width: 100%;
  height: 0;
  position: absolute;
  left: -100px;
  bottom: -50px;
  border: 0 solid transparent;
  border-width: 49px 100px;
  border-bottom-color: #eee;
}

.envelope .flap.top {
  border-top-width: 55px;
  border-top-color: #aaa;
  z-index: 3;
  animation-duration: 1s;
  animation-delay: 8s;
  animation-fill-mode: forwards;
  -webkit-transform-origin-y: top;
  transform-origin-y: top;
  perspective: 800;
  transform-style: preserve-3d;
}
.envelope.open .flap.top {
  animation-name: flip;
}
.envelope .flap.top:after {
  content: "";
  position: absolute;
  left: -100px; /* border-left-width */
  top: -55px; /* border-top-width */
  width: 100%;
  height: 0;
  border: 0 solid transparent;
  border-width: 54px 100px;
  border-top-color: #eee;
}

.envelope .letter {
  position: absolute;
  width: 194px;
  height: 84px;
  background: url(./images/front.png);
  background-size: 100%;
  background-repeat: no-repeat;
  background-position: center;
  top: 8px;
  left: 3px;
  border: 1px solid #ccc;
  z-index: 1;
  animation-duration: 2s;
  animation-delay: 9.5s;
  animation-fill-mode: forwards;
  transform-style: preserve-3d;
}
.envelope.open .letter {
  animation-name: remove;
}
.envelope .letter:before,
.envelope .letter:after {
  content: "";
  position: absolute;
  width: 192px;
  height: 75%;
  left: -1px;
  background: #fff;
  border: 1px solid #ccc;
  animation-duration: 1s;
  animation-delay: 12s;
  animation-fill-mode: forwards;
  -webkit-transform-origin-y: top;
  transform-origin-y: top;
  transform-style: preserve-3d;
  transform: rotateX(10deg);
}
.envelope .letter:before {
  z-index: 1;
}
.envelope.open .letter:before {
  animation-name: fold-up;
}
.envelope .letter:after {
  animation-delay: 13s;
  animation-fill-mode: forwards;
  -webkit-transform-origin-y: bottom;
  transform-origin-y: bottom;
  transform: rotateX(-5deg);
  bottom: 0;
}
.envelope.open .letter:after {
  animation-name: fold-down;
}




/* letter open animation */




@keyframes flip {
  100% {
    transform: rotateX(180deg);
    z-index: 1;
  }
}

@keyframes remove {
  50% {
    top: -120px;
  }
  100% {
    top: 8px;
    z-index: 3;
  }
}

@keyframes fold-up {
  from {
  }
  to {
    transform: rotateX(140deg);
  }
}

@keyframes fold-down {
  from {
  }
  to {
    transform: rotateX(-140deg);
  }
}




/* letter drop from top animation  */




.pop-up {
  margin-top: -230px;
  animation: drop 3s ease forwards;
}

@keyframes drop {
  0% {
  }
  100% {
    transform: translateY(300px);
    opacity: 1;
  }
}




/* image .pop-up with rotating animation */




.book{

  height: 50px;
  width: 50px;
  margin: auto;
  margin-top: 220px;
  z-index: 6;
  opacity: 0;
  animation: circles 3s 15s ease forwards;
}



@keyframes circles{
  0%{
        transform: scale(1) rotate(0deg) ;
        border-radius: 20%;
        opacity: 0.5;
  }
  25%{
        transform: scale(2) rotate(0deg);
        border-radius: 20%;
        opacity: 1;
  }
  50%{
        transform: scale(2) rotate(270deg);
        border-radius: 50%;
        opacity: 1;
  }
  75%{
        transform: scale(3) rotate(270deg);
        border-radius: 50%;
        opacity: 1;
  }
  100%{
        transform: scale(5) rotate(0deg);
        border-radius: 20%;
        opacity: 1;
  }
}

.book-first{
  height: 100%;
  width: 100%;
  font-size: 12px;
  z-index: 7;
  background: url(./images/front.png);
  background-size: 100%;
  background-repeat: no-repeat;
  background-position: center;
  position: absolute;
}





/* emoji top and bottom css */




.top{
  position: fixed;
  left: 0;
  top: 0;
  
}
.bottom{
  position: fixed;
   left: 0;
   bottom: 0;
}






/* dancing letter css wiht animation */






.let{
  margin-top: 120px;
  font-size: 10px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
  opacity: 0;
  animation: textview 1s 20s ease forwards;
}
.happy h1{
  display: flex;
  justify-content: space-evenly;
}
.happy h1 span{
  color: #262626;
  background: #fff; 
  padding: 4px 6px; 
  display: table-cell; 
  box-shadow: inset 0 0 5px 
            rgba(0, 0, 0, 0.3), 
                0 5px 0 #ccc; 
   animation: animate 0.5s infinite; 
}



@keyframes animate { 
  0% { 
    transform: translateY(0px); 
  } 

  50% { 
    transform: translateY(-20px); 
  } 

  100% { 
    transform: translateY(0px); 
  } 
} 



h1 span:nth-child(1) { 
  animation-delay: 0.1s; 
} 

h1 span:nth-child(2) { 
  animation-delay: 0.2s; 
} 

h1 span:nth-child(3) { 
  animation-delay: 0.3s; 
} 

h1 span:nth-child(4) { 
  animation-delay: 0.4s; 
} 

h1 span:nth-child(5) { 
  animation-delay: 0.5s; 
} 

h1 span:nth-child(6) { 
  animation-delay: 0.6s; 
} 

h1 span:nth-child(7) { 
  animation-delay: 0.7s; 
} 

h1 span:nth-child(8) { 
  animation-delay: 0.8s; 
} 

h1 span:nth-child(9) { 
  animation-delay: 0.9s; 
} 

h1 span:nth-child(10) { 
  animation-delay: 1s; 
} 



@keyframes textview {
  100%{
    opacity: 1;
  }
}




/* gif css and animation here */



.gif{
  margin-top: 34px;
  height: 50px;
  width:100%;
  background: url(./images//blast.gif);
  background-size: 100%;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  animation: textview 1s 20s ease forwards;
}